<?php

namespace addon\lian\model\sqlmodel;

use think\Model;


class LianRewardModel extends Model
{
    protected $name = 'lian_reward';

    protected $pk = 'id';


    public function lianOrderGoods()
    {
        return $this->hasOne(GoodsModel::class, 'goods_id', 'order_goods_id');
    }

    public function lianOrder()
    {
        return $this->hasOne(OrderModel::class, 'order_id', 'order_id');
    }

    public function buyMember()
    {
        return $this->hasOne(MemberModel::class, 'member_id', 'buy_mid');
    }

    public function lianLevel()
    {
        return $this->hasOne(LianLevelModel::class, 'level_id', 'level_id');
    }

    public function member()
    {
        return $this->hasOne(MemberModel::class, 'member_id', 'member_id');
    }
}